package com.hsc.yalebao.adapter;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import com.hsc.yalebao.model.PayTypeBean;
import java.util.ArrayList;
import java.util.List;

public class ChongZhiListAdapter extends BaseAdapter
{
  private String Ctype;
  String TAG = "ZZZHListAdapter";
  private Context context;
  private LayoutInflater inflater;
  private List<PayTypeBean> list;
  private List<Boolean> mCheckList = new ArrayList();

  public ChongZhiListAdapter(Context paramContext, List<PayTypeBean> paramList, String paramString)
  {
    this.context = paramContext;
    this.inflater = LayoutInflater.from(paramContext);
    this.list = paramList;
    this.Ctype = paramString;
    int i = 0;
    if (i >= paramList.size())
      return;
    if (i == 0)
      this.mCheckList.add(Boolean.valueOf(true));
    while (true)
    {
      i++;
      break;
      this.mCheckList.add(Boolean.valueOf(false));
    }
  }

  public int getCount()
  {
    if (this.list == null)
      return 0;
    return this.list.size();
  }

  public Object getItem(int paramInt)
  {
    return this.list.get(paramInt);
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  @SuppressLint({"NewApi"})
  public View getView(final int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    ViewHolder localViewHolder;
    if (paramView == null)
    {
      localViewHolder = new ViewHolder();
      paramView = this.inflater.inflate(2130903187, null);
      localViewHolder.mTitleTv = ((TextView)paramView.findViewById(2131100265));
      localViewHolder.mImageView = ((ImageView)paramView.findViewById(2131100264));
      localViewHolder.mCheckBox = ((CheckBox)paramView.findViewById(2131100266));
      paramView.setTag(localViewHolder);
    }
    PayTypeBean localPayTypeBean;
    while (true)
    {
      localPayTypeBean = (PayTypeBean)this.list.get(paramInt);
      if (localPayTypeBean != null)
        break;
      return paramView;
      localViewHolder = (ViewHolder)paramView.getTag();
    }
    switch (Integer.valueOf(localPayTypeBean.getIsSdkEffective()).intValue())
    {
    default:
      String str = localPayTypeBean.getTitle();
      localViewHolder.mTitleTv.setText(str);
      if (this.Ctype.equals("1"))
        localViewHolder.mCheckBox.setVisibility(8);
      break;
    case 2:
    case 7:
    case 8:
    case 9:
    case 11:
    case 12:
    case 14:
    case 16:
    case 18:
    case 20:
    case 22:
    case 24:
    case 3:
    case 6:
    case 10:
    case 13:
    case 15:
    case 17:
    case 19:
    case 21:
    case 23:
    case 25:
    case 1:
    case 4:
    case 5:
    }
    while (true)
    {
      localViewHolder.mCheckBox.setChecked(((Boolean)this.mCheckList.get(paramInt)).booleanValue());
      localViewHolder.mCheckBox.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          int i = 0;
          if (i >= ChongZhiListAdapter.this.mCheckList.size())
          {
            ChongZhiListAdapter.this.notifyDataSetChanged();
            return;
          }
          if (i == paramInt)
            ChongZhiListAdapter.this.mCheckList.set(paramInt, Boolean.valueOf(true));
          while (true)
          {
            i++;
            break;
            ChongZhiListAdapter.this.mCheckList.set(i, Boolean.valueOf(false));
          }
        }
      });
      return paramView;
      localViewHolder.mImageView.setImageResource(2130837729);
      break;
      localViewHolder.mImageView.setImageResource(2130837727);
      break;
      localViewHolder.mImageView.setImageResource(2130837728);
      break;
      localViewHolder.mCheckBox.setVisibility(0);
    }
  }

  public List<Boolean> getmCheckList()
  {
    return this.mCheckList;
  }

  public void setData(ArrayList<PayTypeBean> paramArrayList)
  {
    this.list = paramArrayList;
  }

  public void setmCheckList(List<Boolean> paramList)
  {
    this.mCheckList = paramList;
  }

  public class ViewHolder
  {
    private CheckBox mCheckBox;
    private ImageView mImageView;
    private TextView mTitleTv;

    public ViewHolder()
    {
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.adapter.ChongZhiListAdapter
 * JD-Core Version:    0.6.2
 */